import 'package:f200/features/cart/application/controller/shopping_screen_controller.dart';
import 'package:f200/features/cart/presentation/shopping_cart/shopping_cart_screen.dart';
import 'package:f200/features/categroy/presentation/category_screen.dart';
import 'package:f200/features/member/presentation/mine_page/mine_page.dart';
import 'package:f200/pages/goods/detail/controllers/goods_detail_controller.dart';
import 'package:f200/pages/goods/detail/views/goods_detail_view.dart';
import 'package:f200/system/index/views/index_view.dart';
import 'package:get/get.dart';

enum RouteNames {
  Main(name: '/main', path: '/'),
  GoodsDetail(name: '/goodsDetail', path: '/goodsDetail'),
  Category(name: '/category', path: '/category'),
  CartScreen(name: '/cartScreen', path: '/cartScreen'),
  MinePage(name: '/minePage', path: '/minePage');

  const RouteNames({required this.name, required this.path});

  final String name;
  final String path;
}

class Routes {
  static List<GetPage> pages = [
    GetPage(
      name: RouteNames.Main.name,
      page: () => IndexView(),
    ),
    GetPage(
      name: RouteNames.GoodsDetail.name,
      page: () => GoodsDetailView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => GoodsDetailController());
      }),
    ),
    GetPage(
      name: RouteNames.Category.name,
      page: () => CategoryScreen(),
    ),
    GetPage(
      name: RouteNames.CartScreen.name,
      page: () => ShoppingCartScreen(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ShoppingScreenController());
      }),
    ),
    GetPage(
      name: RouteNames.MinePage.name,
      page: () => MinePage(),
    ),
  ];
}
